package com.itheima.health.dao;

import com.itheima.health.pojo.OrderSetting;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * @author spt
 * @description 预约设置DAO
 * @date 2019/9/29
 **/
@Mapper
@Repository
public interface OrderSettingDao {

    List<OrderSetting> selectByOrderDate(Date orderDate);

    // 预约后，已预约人数加一
    void updateReservations(OrderSetting orderSetting);
    /**
     * 更新
     * @param orderSetting
     */
    void update(OrderSetting orderSetting);

    /**
     * 根据日期查
     * @param orderDate
     * @return
     */
    OrderSetting selectByDate(@Param("orderDate") Date orderDate);

    /**
     * 保存
     * @param orderSetting
     */
    void save(OrderSetting orderSetting);

    long findCountByDate(Date orderDate);

    void editNumByOrderDate(OrderSetting orderSetting);
    //按月份获取预约信息
    List<OrderSetting> getOrderSettingByMonth(Map map);
}
